import java.util.Scanner;



public class Example02 {
    public static void main(String[] args) {
        System.out.println("请输入n和N：");
        Scanner sc = new Scanner(System.in);
        String str=sc.next();
        String [] arr=str.split(",");
        int n= Integer.parseInt(arr[0]);
        int N= Integer.parseInt(arr[1]);
        //和
        int sum=0;
        for (int i = n; i <=N ; i++) {
            if(i%2==0&&i%3==0){
                sum+=i;
            }
        }
       System.out.println(sum);

    }
}
